package unrn.isiii.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import unrn.isiii.dao.IRecorridoDao;
import unrn.isiii.dao.generic.DataAccessService;
import unrn.isiii.model.Recorrido;
import unrn.isiii.model.Usuario;

@Component
public class RecorridoServiceImpl extends DataAccessService<Recorrido> implements
		IRecorridoDao {

	public RecorridoServiceImpl() {
		super(Recorrido.class);
	}
	
	public List<Recorrido> recorridoByLinea(String linea) {
		return getEm()
				.createQuery(
						"select o from Recorrido o "
						+ "where o.linea.nombre = :linea")
				.setParameter("linea", linea).getResultList();
	}

}
